Skip to content

Ignition: verify on all enabled verification services#7967

Merged
kanej merged 16 commits intoNomicFoundation:mainfrom
manuelwedler:ignition-verify-on-all
Mar 17, 2026
Merged

Ignition: verify on all enabled verification services#7967
kanej merged 16 commits intoNomicFoundation:mainfrom
manuelwedler:ignition-verify-on-all

Conversation

@manuelwedler
Copy link
Copy Markdown
Contributor

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

Closes #7538

This changes the ignition deploy very command and the ignition deploy --verify option (the option just calls the task internally) to verify deployed contracts on all enabled verification providers. With this, the verify task of ignition follows the same pattern as the verify task of hardhat-verify.

  • Checks the enabled providers from the hardhat-verify configuration
  • Calls verifyContract for all verification providers that are not disabled for each of the deployed contracts
  • Modifies hardhat-ignition-core to store the creation transaction hash in the deployment information in order to pass it to verifyContract

Example

Screenshot from 2026-02-16 17-47-19-2

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 16, 2026

🦋 Changeset detected

Latest commit: 316c7e9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@nomicfoundation/hardhat-ignition Minor
@nomicfoundation/ignition-core Minor
@nomicfoundation/hardhat-ignition-ethers Minor
@nomicfoundation/hardhat-ignition-viem Minor
@nomicfoundation/ignition-ui Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@manuelwedler manuelwedler changed the title Ignition: verify on Ignition: verify on all enabled verification services Feb 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for verifying deployed contracts on all enabled verification services (Etherscan, Blockscout, and Sourcify) instead of only Etherscan. The implementation follows the same pattern as the standalone hardhat verify command from hardhat-verify.

Changes:

  • Modified the ignition verify task to iterate through all enabled verification providers and verify contracts on each
  • Added creation transaction hash tracking to deployment execution results for Sourcify verification
  • Updated task description from "Verify the deployment on Etherscan" to "Verify the deployment on all supported explorers"

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
v-next/hardhat-ignition/src/internal/tasks/verify.ts Refactored verify task to loop through enabled providers with error handling for individual provider failures
v-next/hardhat-ignition/src/index.ts Updated task description to reflect multi-provider support
v-next/hardhat-ignition/test/tasks/verify.ts Added comprehensive tests for multi-provider verification, error handling, and edge cases
v-next/hardhat-ignition-core/src/internal/execution/types/execution-result.ts Added creationTxHash field to SuccessfulDeploymentExecutionResult
v-next/hardhat-ignition-core/src/strategies/basic-strategy.ts Updated to capture and return creation transaction hash
v-next/hardhat-ignition-core/src/strategies/create2-strategy.ts Updated to capture and return creation transaction hash
v-next/hardhat-ignition-core/src/verify.ts Updated to include creationTxHash in verification information
v-next/hardhat-ignition-core/src/types/verify.ts Added creationTxHash field to VerifyInfo interface
v-next/hardhat-ignition-core/test/**/*.ts Updated test files to include creationTxHash in mock execution results
v-next/hardhat-ignition-core/test/mocks/**/journal.jsonl Updated mock journal files with creationTxHash in deployment results
.changeset/tame-socks-cover.md Added changeset documenting the new feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .changeset/tame-socks-cover.md Outdated
Comment thread v-next/hardhat-ignition-core/test/mocks/verify/min-input/journal.jsonl Outdated
Comment thread v-next/hardhat-ignition-core/test/mocks/verify/min-input/journal.jsonl Outdated
Comment thread v-next/hardhat-ignition-core/test/mocks/verify/libraries/journal.jsonl Outdated
Comment thread v-next/hardhat-ignition-core/test/mocks/verify/unsupported-chain/journal.jsonl Outdated
Comment thread v-next/hardhat-ignition-core/test/mocks/status/success/journal.jsonl Outdated
Comment thread v-next/hardhat-ignition-core/test/mocks/status/external-artifact/journal.jsonl Outdated
Comment thread v-next/hardhat-ignition-core/test/mocks/listTransactions/success/journal.jsonl Outdated
@kanej kanej added _priority:P1 High priority and removed status:triaging labels Feb 25, 2026
@kanej
Copy link
Copy Markdown
Member

kanej commented Feb 25, 2026

Hey @manuelwedler, thanks for this!
We will try and get the review turned round on this in the next week.

@kanej kanej self-requested a review February 27, 2026 17:24
@manuelwedler
Copy link
Copy Markdown
Contributor Author

Hey @kanej , any update on this?

Copilot AI review requested due to automatic review settings March 16, 2026 16:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.


You can also share your feedback on Copilot code review. Take the survey.

Comment thread v-next/hardhat-ignition/src/internal/tasks/verify.ts
Comment thread v-next/hardhat-ignition/src/internal/tasks/verify.ts
Comment thread v-next/hardhat-ignition/src/internal/tasks/verify.ts
@kanej
Copy link
Copy Markdown
Member

kanej commented Mar 16, 2026

Hey @manuelwedler, thanks for putting this together.

The threading through of creationTxHash makes sense, but would imply a migration for existing journal files - and we try to avoid that.

I have switched to pulling the creation transaction from the deployment state. I am assuming that the last confirmed transaction is the creation transaction but for the two strategies we have (basic and create2) this is the case.

I have done a manual test with Sourcify and I was able to get an Exact Match for both standard deployments and create2 deployments.

Can you take a look, and if your happy I will merge in the new feature and get it released.

@manuelwedler
Copy link
Copy Markdown
Contributor Author

Hey @kanej, thanks for finalizing this PR! The changes look good to me. The assumption of using the last confirmed transaction as the creation transaction seems to make sense. So let's get this merged :)

@kanej kanej added this pull request to the merge queue Mar 17, 2026
Merged via the queue into NomicFoundation:main with commit cf7db88 Mar 17, 2026
93 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 17, 2026
@manuelwedler
Copy link
Copy Markdown
Contributor Author

@kanej I just created a PR against hardhat-website to update the docs for this change: NomicFoundation/hardhat-website#242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

_priority:P1 High priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ignition support for verification with sourcify.dev

3 participants